# -*- coding: UTF-8 -*-

from flask import Flask
from pymysql import install_as_MySQLdb
import datetime

from exts import db
from views import *
from config import Config
from models import *

# 建立app
app = Flask(__name__, static_url_path='')
app.config.from_object(Config)  # 配置app

# install_as_MySQLdb()
# app.app_context().push()

# # 注册蓝图
# app.register_blueprint(user_bp)

# # app绑定到数据库
# db.init_app(app)

# db.drop_all()
# db.create_all()


@app.route('/')
def root():
    return '请勿直接访问服务器'


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=8888)
